import { defineConfig } from 'vite'
import { resolve } from "path";
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      "@": resolve(__dirname, "src")
    }
  },
  server: {
    host: "0.0.0.0",
    port: 8848,
    open: true,
    cors: true,
    proxy: {
      "/admin-batch": {
        target: "http://14.103.135.216:8092",
        // target: "http://localhost:8092",
        changeOrigin: true
      },
      "/admin": {
        target: "http://14.103.135.216:8091",
        // target: "http://localhost:8091",
        changeOrigin: true
      },
      "/file": {
        target: "http://14.103.135.216:8093",
        // target: "http://localhost:8093",
        changeOrigin: true
      },
    }
  }
})
